package com.lzs.bootsafety.business.sys.service.impl;

import com.lzs.bootsafety.business.sys.entity.SysUserRole;
import com.lzs.bootsafety.business.sys.mapper.SysUserRoleMapper;
import com.lzs.bootsafety.business.sys.service.SysUserRoleService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;
@Service
public class SysUserRoleServiceImpl implements SysUserRoleService {
    @Autowired
    private SysUserRoleMapper sysUserRoleMapper;

    /**
     * 批量添加用户角色
     * @param sysUserRoles
     * @return
     */
    @Override
    public int addUserRole(List<SysUserRole> sysUserRoles) {
        return sysUserRoleMapper.insertUserRole(sysUserRoles);
    }

    @Override
    public int delUserRoleByUserId(List<Long> userId) {
        return sysUserRoleMapper.deleteUserRoleByUserId(userId);
    }
}
